#include "StdAfx.h"
#include "../Engine/TerrainTileSet.hpp"

namespace he
{
	TerrainTileSet::TerrainTileSet(TerrainTileSplat const &Splat, std::string const &MaterialName)
		: m_SplatUsed(Splat), m_MaterialName(MaterialName)
	{
	}

	void TerrainTileSet::add_type(unsigned short Type, TextureAtlasInfo_t const &Variant)
	{
		m_TerrainTypeMap[Type].push_back(Variant);
	}

	TextureAtlasInfo_t const &TerrainTileSet::get_tile_type(unsigned short Type, std::uint_least8_t Variant) const
	{
		return m_TerrainTypeMap.find(Type)->second.at(Variant);
	}

	TerrainTileSplat const &TerrainTileSet::get_splat() const
	{
		return m_SplatUsed;
	}

	std::string const &TerrainTileSet::get_material_name() const
	{
		return m_MaterialName;
	}
} /*he*/